package com.example.day02.mapper;

import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface BookMapper {

    @Select("select price from spring_book where id=#{id}")
    double getPrice(Integer id);

    @Update("update spring_book set book_stock=book_stock-1 where id=#{id}")
    int update(Integer id);
}
